package cn.controller;

import cn.service.impl.PmsProductServiceImpl;
import entity.Result;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@CrossOrigin
public class PmsProductController {
    @Resource
    PmsProductServiceImpl pmsProductService;

    @RequestMapping("/getProductNum")
    public Result getProductNum(Integer brand_id) {//根据品牌id返回该品牌商品的数量
        return pmsProductService.selectProductNumByBrandId(brand_id);
    }
}
